<!-- 关注店铺详情弹窗 -->
<template>
            <a-form
                    ref="form3"
                    class="ele-form-detail"
                    :model="followStoreModalApp.followStore"
                    :label-col="{md: {span: 2}, sm: {span: 4}, xs: {span: 6}}"
                    :wrapper-col="{md: {span: 22}, sm: {span: 20}, xs: {span: 18}}">
                <a-descriptions :title="followStoreModalApp.title" bordered>
                                    <a-descriptions-item label="标识">
                        {{ followStoreModalApp.followStore.Eid }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建人">
                        {{ followStoreModalApp.followStore.creatorName }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="名称">
                        {{ followStoreModalApp.followStore.name }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="店铺">
                        {{ followStoreModalApp.followStore.shopId }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="附件">
                        {{ followStoreModalApp.followStore.attachmentsId }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="购买用户">
                        {{ followStoreModalApp.followStore.userId }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="状态">
                        {{ followStoreModalApp.followStore.status }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建人ID">
                        {{ followStoreModalApp.followStore.creatorId }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="备注">
                        {{ followStoreModalApp.followStore.remark }}
                    </a-descriptions-item>
                                    <a-descriptions-item label="创建时间">
                        {{ followStoreModalApp.followStore.createDatetime }}
                    </a-descriptions-item>
                                </a-descriptions>
            </a-form>
</template>

<script>
    import {defineComponent, reactive, onMounted, inject} from "vue";
    import {useRoute} from "vue-router"
    import {FollowStoreService} from "@/views/mall/merchant/followStore/followStoreService";

    export default defineComponent({
        setup() {
            const route = useRoute();
            let routeId = route.params.id;
            let followStoreListApp = inject('followStoreListApp', reactive({}));
            const followStoreModalApp = reactive({id: null, followStore: {}, display: false});

            onMounted(() => {
                    followStoreModalApp.followStore = {};
                if (routeId) {
                        followStoreModalApp.id = routeId;
                } else if (followStoreListApp.viewModalShowing) {
                        followStoreModalApp.id = followStoreListApp.currentId;
                        followStoreModalApp.display = true;
                }
                if (followStoreModalApp.id) {
                    getInfo(followStoreModalApp.id);
                }
            })

            const getInfo = (id) => {
                    FollowStoreService.findFollowStore(id).then((res) => {
                            followStoreModalApp.followStore = res.data;
                            followStoreModalApp.title = "查看 " + followStoreModalApp.followStore.name;
                })
            }

            return {
                    followStoreModalApp,
                routeId,
                getInfo,
            }
        }
    })
</script>

<style scoped>
</style>

